﻿using WorldMapBase.Tile.Pool;

namespace Yoozoo.Modules.Download
{
    public class UnityWebRequestDownloadPool : ObjectPool<UnityWebRequestDownload>
    {
        public UnityWebRequestDownloadPool(int capacity) : base(capacity)
        {
        }

        public UnityWebRequestDownloadPool(int capacity, bool enableAutoShrink, int idleMaxCount, int frameShrinkCount, float shrinkIntervalTime) : base(capacity, enableAutoShrink, idleMaxCount, frameShrinkCount, shrinkIntervalTime)
        {
        }

        protected override UnityWebRequestDownload ConstructItem()
        {
            return new UnityWebRequestDownload();
        }

        protected override void BeforeRecover(UnityWebRequestDownload obj)
        {
            obj.Reset();
        }
    }
}